import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '标准物质名称',
    align: "center",
    dataIndex: 'name'
  },
  {
    title: '标准物质类别',
    align: "center",
    dataIndex: 'type'
  },
  {
    title: '标准物质批号',
    align: "center",
    dataIndex: 'batch'
  },
  {
    title: '纯度/标准值',
    align: "center",
    dataIndex: 'purity'
  },
  {
    title: '生产厂家',
    align: "center",
    dataIndex: 'factory'
  },
  {
    title: '规格',
    align: "center",
    dataIndex: 'specs'
  },
  {
    title: '当前库存量',
    align: "center",
    dataIndex: 'inventoryNow'
  },
  {
    title: '单位',
    align: "center",
    dataIndex: 'unity'
  },
  {
    title: '归还入库量',
    align: "center",
    dataIndex: 'putNumber'
  },
  {
    title: '单位',
    align: "center",
    dataIndex: 'unit'
  },
  {
    title: '出库量',
    align: "center",
    dataIndex: 'outNumber'
  },
  {
    title: '单位',
    align: "center",
    dataIndex: 'units'
  },
  {
    title: '领用业务id',
    align: "center",
    dataIndex: 'usedId'
  },
  {
    title: '标准物质id',
    align: "center",
    dataIndex: 'chemicalId'
  },
];

//列表数据
export const describeColumns: BasicColumn[] = [
  {
    title: '标准物质名称',
    align: "center",
    dataIndex: 'name'
  },
  {
    title: '标准物质类别',
    align: "center",
    dataIndex: 'type'
  },
  {
    title: '标准物质批号',
    align: "center",
    dataIndex: 'batch'
  },
 
  {
    title: '生产厂家',
    align: "center",
    dataIndex: 'factory'
  },
  
  {
    title: '当前库存量',
    align: "center",
    dataIndex: 'inventoryNow'
  },
  // {
  //   title: '单位',
  //   align: "center",
  //   dataIndex: 'unity'
  // },
  {
    title: '归还入库量',
    align: "center",
    edit: true,
    editRule: true,
    editComponent: 'InputNumber',
    dataIndex: 'putNumber'
  },
  // {
  //   title: '单位',
  //   align: "center",
  //   dataIndex: 'unit'
  // },
  {
    title: '出库量',
    align: "center",
    edit: true,
    editRule: true,
    editComponent: 'InputNumber',
    dataIndex: 'outNumber'
  },
  // {
  //   title: '单位',
  //   align: "center",
  //   dataIndex: 'units'
  // },
  // {
  //   title: '领用业务id',
  //   align: "center",
  //   dataIndex: 'usedId'
  // },
  // {
  //   title: '标准物质id',
  //   align: "center",
  //   dataIndex: 'chemicalId'
  // },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];

//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '标准物质名称',
    field: 'name',
    component: 'Input',
  },
  {
    label: '标准物质类别',
    field: 'type',
    component: 'Input',
  },
  {
    label: '标准物质批号',
    field: 'batch',
    component: 'Input',
  },
  {
    label: '纯度/标准值',
    field: 'purity',
    component: 'Input',
  },
  {
    label: '生产厂家',
    field: 'factory',
    component: 'Input',
  },
  {
    label: '规格',
    field: 'specs',
    component: 'Input',
  },
  {
    label: '当前库存量',
    field: 'inventoryNow',
    component: 'InputNumber',
  },
  {
    label: '单位',
    field: 'unity',
    component: 'Input',
  },
  {
    label: '归还入库量',
    field: 'putNumber',
    component: 'InputNumber',
  },
  {
    label: '单位',
    field: 'unit',
    component: 'Input',
  },
  {
    label: '出库量',
    field: 'outNumber',
    component: 'InputNumber',
  },
  {
    label: '单位',
    field: 'units',
    component: 'Input',
  },
  {
    label: '领用业务id',
    field: 'usedId',
    component: 'Input',
  },
  {
    label: '标准物质id',
    field: 'chemicalId',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];
